<?php
	namespace Admin\Model;
	use Think\Model;
	class AwardModel extends Model{

		/**
		 * 检查中奖概率是否超过100%
		 * @author tiedong
		 * @date 2018-01-16
		 */
        public function check_probability($id )
        {
			$sql = " SELECT SUM(probability) as cnt FROM lr_award WHERE del=0 AND id !=$id";
			$result = current($this->query($sql));
			return $result['cnt'];
		}
	}
?>
